<!-- 文件库start-->
<script id="tpl-file-library" type="text/template">
	<div class="v-box-header clearfix">
		<div class="clearfix pull-left">
        	<div class="j-upload upload-image">
           		<i class="fa fa-plus"></i>上传图片
        	</div>
    	</div>    	
		<div class="pull-right clearfix">
			<div class="clearfix pull-left">
            	<div class="btn-group" id="group-select">
                	<button type="button" class="btn btn-sm btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    		移动至<span class="caret"></span>
                	</button>
                	<ul class="dropdown-menu group-list">
                    	{{ each group_list }}
                        	<li>
                            	<a class="move-file-group" data-group-id="{{ $value.groupId }}"
                                	href="javascript:void(0);">{{ $value.groupName }}</a>
                        	</li>
                    	{{ /each }}
                	</ul>
            	</div>
        	</div>
        	<div class="clearfix pull-left" style="margin-left:5px;">
            	<a href="javascript:void(0);" class="file-delete btn btn-sm btn-danger" data-group-id="2">
                	<i class="fa fa-trash"></i> 删除
            	</a>
        	</div>
        	<div class="input-group input-group-sm clearfix pull-left" style="width:300px;margin-left:5px;">
            	<input type="text" name="search" id="file-search-value" value="" class="form-control" placeholder="搜索素材">
            	<div class="input-group-btn">
                	<button class="btn btn-default" id="file-search-submit" type="buttonn"><i class="fa fa-search"></i></button>
                	<a href="javascript:void(0);" class="file-refresh btn btn-default"><i class="fa fa-refresh"></i></a>
            	</div>
        	</div>
    	</div>
	</div>
    <div class="file-group">
        <ul class="nav-new">
            <li class="ng-scope {{ is_default ? 'active' : '' }}" data-group-id="-1">
                <a class="group-name" href="javascript:void(0);" title="所有文件">所有文件</a>
            </li>
            <li class="ng-scope" data-group-id="0">
                <a class="group-name" href="javascript:void(0);" title="默认文件夹"><i class="fa fa-cogs"></i> 默认文件夹</a>
            </li>
            {{ each group_list }}
            <li class="ng-scope" data-group-id="{{ $value.groupId }}" title="{{ $value.groupName }}">
				<a class="group-edit" href="javascript:void(0);" title="重命名">
                    <i class="fa fa-edit"></i>
                </a>
                <a class="group-name" href="javascript:void(0);">
                    <i class="fa fa-folder"></i> {{ $value.groupName }}
                </a>
                <a class="group-delete" href="javascript:void(0);" title="删除">
                    <i class="fa fa-remove"></i>
                </a>
            </li>
            {{ /each }}
        </ul>
        <a class="group-add" href="javascript:void(0);"><i class="fa fa-plus"></i> 添加文件夹</a>
    </div>
    <div class="file-list">
        <div id="file-list-body" class="v-box-body">
            {{ include 'tpl-file-list' file_list }}
        </div>
        <div class="v-box-footer clearfix"></div>
    </div>
</script>
<!-- 文件库end-->
<!-- 文件列表模板start -->
<script id="tpl-file-list" type="text/template">
<ul class="file-list-item" id="file-list-scroll">
	{{ if total != 0 }}
		{{ include 'tpl-file-list-item' data }} 
	{{ /if }}
	{{ if total == 0 }}
		<div style="text-align:center;margin-top:200px;">
			<span>未找到相关数据</span>
		</div>
	{{ /if }}
</ul>
<div class="file-page-box" style="text-align:center;" id="file-page-box">
	<ul class="pagination">
		{{ if current_page < last_page }}
			<li>
				<a class="switch-page" href="javascript:void(0);" title="点击加载更多" data-page="{{ current_page + 1 }}">点击加载更多</a>
			</li>
		{{ /if }}
		{{ if current_page === last_page }}
			<li>没有更多数据了</li>
		{{ /if }}
	</ul>
</div>
</script>
<script id="tpl-file-list-item" type="text/template">
{{ each $data }}
	<li class="ng-scope" title="{{ $value.originalName }}" data-file-id="{{ $value.fileId }}" data-file-path="{{ $value.fileUrl }}"
    	data-file-url="{{ $value.fileUrl }}">
    	<div class="img-cover" style="background-image: url('{{ $value.fileUrl }}')">
    	</div>
    	<p class="file-name text-center" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ $value.originalName }}</p>
    	<div class="select-mask">
    	</div>
	</li>
{{ /each }}
</script>
<!-- 文件列表end -->
<!-- 新增分组元素start-->
<script id="tpl-group-item" type="text/template">
	<li class="ng-scope" data-group-id="{{ groupId }}" title="{{ groupName }}">
    	<a class="group-edit" href="javascript:void(0);" title="重命名">
        	<i class="fa fa-edit"></i>
    	</a>
    	<a class="group-name " href="javascript:void(0);">
        	<i class="fa fa-folder"></i> {{ groupName }}
    	</a>
    	<a class="group-delete" href="javascript:void(0);" title="删除">
        	<i class="fa fa-remove"></i>
    	</a>
	</li>
</script>
<!-- 新增分组元素end-->
<!-- 新增图片列表start -->
<script id="tpl-file-item" type="text/template">
{{ each list }}
	<div class="file-item">
    	<img src="{{ $value.fileUrl }}">
    	<input type="hidden" name="{{ name }}" value="{{ $value.fileUrl}}">
    	<i class="fa fa-remove file-item-delete"></i>
	</div>
{{ /each }}
</script>
<!-- 新增图片列表startend -->